package com.yztc.http;


import com.yztc.bean.classify.ClassifyBean;
import com.yztc.bean.classifydetail.ClassifyDetailBean;
import com.yztc.bean.classifydetail.ClassifyDetailHeaderBean;
import com.yztc.bean.cook.CategoryInfoBean;
import com.yztc.bean.cook.CookMainBean;
import com.yztc.bean.cook.NewFoodBean;
import com.yztc.bean.details.DetailsBean;
import com.yztc.bean.home.HomeFragmentBean;
import com.yztc.ui.classify.config.ClassifyUrlConfig;
import com.yztc.ui.home.config.HomeUrlConfig;

import java.util.Map;

import retrofit2.http.GET;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import rx.Observable;


/**
 * Created by My on 2016/10/6.
 */
public interface RetrofitService {
    //获取产品详情页面的数据
    @GET(HomeUrlConfig.Path.DETAILS_PATH_URL)
    Observable<DetailsBean> getDetailsBean(@Query("product_id") int id);

    @GET("Home/newindex")
    Observable<HomeFragmentBean> getHomeFragmentBean();

    //分类首页产品详情数据
    @GET(ClassifyUrlConfig.Path.URL_VERTICAL)
    Observable<ClassifyBean> getClassifyBean();

     //    http://api.chunbo.com/Search/category_list/?
    // cid=521&cid_l=1&order=0&type=1&page=1&page_size=20
    //分类详情产品地址
    @GET("Search/category_list")
    Observable<ClassifyDetailBean> getClassifyDetailBean(@QueryMap Map<String,String> map);

    //    http://api.chunbo.com/Search/getCatOther/?cid=521
    //分类详情Heather布局数据地址
    @GET("Search/getCatOther/")
    Observable<ClassifyDetailHeaderBean> getClassifyDetailHeaderBean(@Query("cid") int id);

    //cooker
    @GET("CookbookHome/getTopicList")
    Observable<NewFoodBean> getNewFoodBean();
    //cooker
    @GET("CookbookHome/getCookbookIndex")
    Observable<CookMainBean> getCookMainBean();
    //cooker
    @GET("Cookbook/appcookbooklist/?page=1&pagesize=10&class_id=")
    Observable<CategoryInfoBean> getCategoryInfoBean(@Query("class_id") String id);

}
